package model

import (
	"log"

	_ "github.com/go-sql-driver/mysql"
	"github.com/jmoiron/sqlx"
)

var DB *sqlx.DB

func init() {
	database, err := sqlx.Open("mysql", "root:123456@tcp(127.0.0.1:3307)/grs")
	if err != nil {
		log.Fatal(err, DB)
	}
	DB = database
	log.Println("open database successfully!")
}
